﻿using System;

namespace FNN.CustomFunctions
{
    [Serializable]
    public class BipolarSigmoid : IFunction
    {
        /// <summary>
        ///     Функция y = (2/(1+e^(-x))-1)
        /// </summary>
        /// <param name="param">Аргумент функции</param>
        /// <returns>Значение функции</returns>
        public double Calculate(double param)
        {
            return (2 / (1 + Math.Exp(-param)) - 1);
        }
    }
}
